<%-- 
    Document   : cmsHome
    Created on : Aug 4, 2009, 4:10:59 PM
    Author     : pavan
--%>
<%@ page import="java.io.* , java.util.*, java.sql.*, com.myapp.struts.dao.*,com.myapp.struts.beans.*"%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>::: Construction Management ERP ::: </title>
        <link href="css/cms.css" rel="stylesheet" type="text/css">
        <link rel="stylesheet" type="text/css" href="css/chromestyle.css" />
        <script type="text/javascript" src="js/chrome.js"></script>
        <style type="text/css">
            <!--
            .style8 {
                font-weight: bold;
                font-size: 24px;
                color: #D3F1D5;
            }
            .style9 {
                color: #D3F1D5;
                font-weight: bold;
            }
            -->
        </style>
    </head>
    <body>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td colspan="2" rowspan="2" valign="top" bgcolor="#115445"><div class="logo-bg" style="float: left; text-align: left; width:10%; height:60px;"></div>
                    <div style="float:left; text-align: left;width:5%; height:40px; margin-top:5%;"></div>
                    <div class="style8" style="float:left; margin-top:2%; text-align: left; width:80%; height:50px;">SUNITA CONSTRUCTIONS</div></td>
                <td width="64%" height="33" bgcolor="#115445"><span class="style6 style9">(<%=session.getAttribute("name")%> )(<%=session.getAttribute("role")%>) &nbsp; Has Logged On</span></td>
            </tr>
            <tr>
                <td><div class="chromestyle" id="chromemenu">
                        <ul>
                            <li><a href="#">Home</a></li>
                            <li><a href="#" rel="dropmenu1">Masters</a></li>
                            <li><a href="#" rel="dropmenu2">Entries</a></li>
                            <li><a href="#" rel="dropmenu3">Reports</a></li>
                            <li><a href="Logout" rel="dropmenu5">Logout</a></li>
                        </ul>
                    </div>
                    <!--1st drop down menu -->
                    <div id="dropmenu1" class="dropmenudiv">
                        <%
                        String role = session.getAttribute("role").toString();
                        MenuDao mdao = new MenuDao();
                        Vector gp = mdao.getItems(role, "M");
                        if (gp != null) {
                            System.out.println("IN..................." + gp.size());
                            Iterator itg = gp.iterator();
                            while (itg.hasNext()) {
                                MenuBean gb = (MenuBean) itg.next();
                                String pname = gb.getPrivlageName();
                                String ppath = gb.getPrivlagePath();
                        %>
                        <a href="<%=ppath%>" target="lions"><%=pname%></a>
                        <%}

                        }%>
                    </div>
                    <!--2nd drop down menu -->
                    <div id="dropmenu2" class="dropmenudiv" style="width: 150px;">
                        <%MenuDao mdao1 = new MenuDao();
                        Vector gp1 = mdao1.getItems(role, "E");
                        if (gp1 != null) {
                            System.out.println("IN..................." + gp1.size());
                            Iterator itg = gp1.iterator();
                            while (itg.hasNext()) {
                                MenuBean gb = (MenuBean) itg.next();
                                String pname = gb.getPrivlageName();
                                String ppath = gb.getPrivlagePath();
                        %>
                        <a href="<%=ppath%>" target="lions"><%=pname%></a>
                        <%}

                        }%>
                    </div>
                    <!--3rd drop down menu -->
                    <div id="dropmenu3" class="dropmenudiv" style="width: 150px;">
                        <%MenuDao mdao2 = new MenuDao();
                        Vector gpP = mdao2.getItems(role, "R");
                        if (gpP != null) {
                            System.out.println("IN..................." + gpP.size());
                            Iterator itg = gpP.iterator();
                            while (itg.hasNext()) {
                                MenuBean gb = (MenuBean) itg.next();
                                String pname = gb.getPrivlageName();
                                String ppath = gb.getPrivlagePath();
                        %>
                        <a href="<%=ppath%>" target="lions"><%=pname%></a>
                        <%}

                        }%>
                    </div>
                    <script type="text/javascript">

                        cssdropdown.startchrome("chromemenu")

                    </script></td>
            </tr>
            <tr>
                <td colspan="3" align="center" valign="top"><iframe width="100%"  height="500" name="lions"></iframe></td>
            </tr>
        </table>
    </body>
</html>
